package com.otherTest.other;

import org.junit.Test;

import java.util.Date;

/**
 * @author Conceit
 * @version 1.0, 2016/11/27
 */
public class cn {
    public static void main(String[] args) {
        int i=4;
        if(i<4){
            System.out.println("小于4");
        }else if(i>4){
            System.out.println("大于4");
        }else{
            System.out.println("这个我去");
        }

        double angle=2*(Math.acos((0-0.748+1.65)/1.65));
        //液位面积=扇形面积+三角形面积

        //全部面积
        double totalArea=0;

        //扇形面积
        double sectorArea=0;//0.047156322707921514
        double angle1=(angle/360);
        double angle2=Math.PI*(Math.pow(1.65*2,2));
        double angle3=angle2/4;
        double angle4=angle1*angle3;
        //System.out.println(angle4);//old  0.047156322707921514
        sectorArea=angle4;

        //三角面积 //old=1.246228478724507
        double triangleArea=((Math.pow(1.65*2,2)/4)*(Math.sin(angle/2))*(Math.cos(angle/2)));
        //
        double t1=Math.pow(1.65*2,2)/4;
        double t2=Math.sin(angle/2);
        double t3=Math.cos(angle/2);
        double t4=t1*t2*t3;
//        System.out.println("t4   "+t4);

        //液位面积
        double liquidArea=sectorArea-triangleArea;

        //液位面积*流速=流量
        Double flowData=liquidArea*1.03;

//       double angle=2*Math.acos((0-0.748+(1.65))/(1.65));
//        System.out.println((3+100/2)/(3/2));
//        System.out.println(angle);
//        System.out.println("扇形面积"+sectorArea);
//        System.out.println("三角面积"+triangleArea);

//        System.out.println("流量"+flowData);

        liquidArea = Math.pow(1.65, 2) * Math.acos((0.745 - 1.65) / 1.65)
                - (0.745 - 1.65) * Math.sqrt(Math.pow(1.65, 2) - Math.pow(0.745- 1.65, 2));

        System.out.println(liquidArea*1.03);


    }

    @Test
    public void test(){
        int one=100;
        int two=98;
        long max= Math.max(new Date().getTime(),new Date().getTime()+4000);
        long min= Math.min(new Date().getTime(),new Date().getTime()+4000);
        System.out.println(max);
        System.out.println(min);

        if(max-min<5000){
            System.out.println("两哥相差不超过5S");
        }else {
            System.out.println("两哥相差超过5");
        }

    }
}
